package homework1.test04;

public class Dog {
    // 私有属性
    private String color;
    private String breed;

    // 空参构造方法
    public Dog() {}

    // 有参构造方法
    public Dog(String color, String breed) {
        this.color = color;
        this.breed = breed;
    }

    // setter和getter方法
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getBreed() {
        return breed;
    }

    public void setBreed(String breed) {
        this.breed = breed;
    }

    // 吃饭行为
    public void eat() {
        System.out.println(color + "的" + breed + "正在啃骨头......");
    }

    // 看家行为
    public void lookHome() {
        System.out.println(color + "的" + breed + "正在看家......");
    }
}

